home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan 2
/
Opus 5 - Magellan 2.iso
/
Extras
/
Delete_dopus5
/
Delete3.dopus5
< prev
next >
Wrap
Text File
|
1996-06-09
|
2KB
|
84 lines
/* Programm: Delete3.dopus5
** ------------------------------------------------------------------------------
** ARexx DOpus5:ARexx/Delete3.dopus5 {Qp}
** ------------------------------------------------------------------------------
** Set all Attribut off.
*/
parse arg portname
if portname='' then
portname='DOPUS.1'
address value portname
options results
options failat 21
lf='0a'x
if ~show('l','rexxsupport.library') then
call addlib('rexxsupport.library',0,-30,0)
/* init locale */
if ~show(l,'locale.library') then
call addlib('locale.library',0,-30)
if show(l,'locale.library') then
catalog=opencatalog('Delete2.catalog','deutsch',0)
lister query source
if rc>0 then do
dopus front
dopus request '"'getcatstr(0,'Error:'lf'Kein Quellverzeichnis gewählt')'"' getcatstr(1,'Ende')
exit
end
parse var result handle
lister query handle numselfiles
if result=0 then do
dopus front
dopus request '"'getcatstr(1,'Error:'lf'Keine Einträge selektiert')'"' getcatstr(1,'Ende')
exit
end
dopus front
dopus request '"'getcatstr(2,'Warnung:'lf'Jede 3.Datei wird gelöscht.')'"' getcatstr(1,'OK|Abbruch')
If DOPUSRC=0 then exit
lister set handle busy on
lister query handle path
QuellPfad=result
lister query handle selfiles stem files.
lister set handle progress files.count getcatstr(3,'Lösche Dateien ...')
lister refresh handle full
J=1
do i=0 to files.count-1
lister query handle abort
if result then do
test=0
leave
end
lister set handle progress count i+1
lister set handle progress name files.i
Titel=Quellpfad||files.i
j=j+1
If J>3 then do
j=1
address command "DELETE >NIL: "||'"'Titel'"'
end
lister select handle '"'files.i'"' off
end
lister refresh handle full
lister set handle busy off
Exit
/*--------------------------------------------------------------------------------*/
getcatstr:
parse arg msgno,msgstring,insert.1,insert.2
if catalog~=0 then msgstring=getcatalogstr(catalog,msgno,msgstring)
j=0
do while pos('%s',msgstring)>0
parse var msgstring fore '%s' aft
j=j+1
msgstring=fore||insert.j||aft
end
return msgstring